package com.bestcem.xm.deliver.controller.v2.param;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.util.List;

@Data
@NoArgsConstructor
public class CreateWechatMpdeliversParam {
    @NotEmpty
    @JsonProperty("survey_id")
    private String surveyId;

    @NotEmpty
    @Length(max = 30, message = "投放名称显示最多30个字符")
    @JsonProperty("_deliver_name")
    private String deliverName;

    @JsonProperty("deliver_g_id")
    private String deliverGid;

    @NotNull
    @JsonProperty("survey_submit_type")
    private Integer surveySubmitType;

    @NotNull
    @JsonProperty("is_sms_added")
    private Boolean isSmsAdded;

    @NotNull
    @JsonProperty("check_submit")
    private Integer checkSubmit;

    @NotNull
    @JsonProperty("is_check")
    private Integer isCheck;

    @JsonProperty("is_delay")
    private Integer isDelay;

    @JsonProperty("deliver_time")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy/MM/dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime deliverTime;

    @NotEmpty
    @JsonProperty("anti_distur_times")
    private List<String> antiDisturTimes;

    @NotNull
    @JsonProperty("mp_ttype")
    private Integer mpTtype;

    @JsonProperty("wechatmp_subject")
    private String wechatMpsubject;

    @JsonProperty("wechatmp_template")
    private String wechatMptemplate;

    private String hashCode;

    @JsonProperty("deliver_id")
    private String deliverId;

    @JsonProperty("appid")
    private String appid;

    @JsonProperty("mp_template_id")
    private String mpTemplateId;

    @JsonProperty("mp_template_title")
    private String mpTemplateTitle;

    @JsonProperty("mp_template_content")
    private String mpTemplateContent;

    @JsonProperty("mp_name")
    private String mpName;

    @JsonProperty("member_id_list")
    private List<String> memberIdlist;

    @JsonProperty(value = "option_deliver_time")
    private String optionDeliverTime;

    @JsonProperty(value = "filter_params")
    private String filterParams;

    @JsonProperty(value = "no_disturb_member_id_list")
    private List<String> noDisturbMemberIdList;
}
